package com.yqzl.cofig;

import com.google.code.kaptcha.servlet.KaptchaServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class WebConfig {

  @Bean
  public ServletRegistrationBean KaptchaServlet() {
    KaptchaServlet kaptchaServlet = new KaptchaServlet();
    ServletRegistrationBean ServletRegistrationBean = new ServletRegistrationBean(kaptchaServlet, "/PicCode", "/code");
    return ServletRegistrationBean;
  }
}
